<%= javascript_include_tag 'pagination' %>

<div class="portlet">
  <div class="portlet-header">
    <% if  @special_list == WishList::TYPE_CART %>
      <h1><%=t('.title_cart')%></h1>
    <% end %>
    <% if  @special_list == WishList::TYPE_RESERVE %>
      <h1><%=t('.title_reserve')%></h1>
    <% end %>
  </div>


  <div class="portlet-content">

    <% form_tag my_wish_list_add_materials_to_special_list_path, :id => 'my_form' do %>
      <%= hidden_field_tag :type_item_list, @type_item_list %>
      <%= hidden_field_tag :special_list, @special_list %>

      <div>
        <table style="border: none">
          <tr>            
          </tr>
          <tr>
            <% if @type_item_list == "Material" %>
              <td><%= render :partial => 'define_materials_to_special_list_from_materials' %></td>
            <% end %>
            <% if @type_item_list == "MaterialsWishList" %>
              <td><%= render :partial => 'define_materials_to_special_list_from_wish_lists' %></td>
            <% end %>
          </tr>
        </table>
      </div>
      <div>
          
        <table style="border: none">
          <% if @type_item_list == "MaterialsWishList" %>
            <tr>
              <td>
                <%= check_box_tag 'remove_materials_from_wish_lists', "yes", false, :class => "check" %>
              </td>
              <td align="left">
                <%=t(".lbl_remove_materials_from_wish_list")%>
              </td>
            </tr>
          <%end%>
          <tr>
            <td colspan="2">
              <% if  @special_list == WishList::TYPE_CART %>
                <%= submit_tag t('.btn_add_to_cart'), :name => "add_materials_to_cart" %>
              <% end %>
              <% if  @special_list == WishList::TYPE_RESERVE %>
                <%= submit_tag t('.btn_add_to_reserve'), :name => "add_materials_to_reserve" %>
              <% end %>

              <% if !session[:special_return_to_controller].nil? %>
                <br/>
                <br/>
                <%=link_to t('btn_back'), :controller => session[:special_return_to_controller], :action => :special_return_to%>
              <% end %>
            </td>
          </tr>
        </table>

      </div>
    <% end %>
  </div>

  <div class="portlet-footer">
  </div>
</div>